export const indexConfig = (params = {}) => http.get('/appConfig/home/page', {params});
export const centerConfig = (params = {}) => http.get('/appConfig/personal/center', {params});


// let indexConfigUrl = "/v1/home/page";
let registerUrl = "/api/user/register" // 注册


// 如果没有通过拦截器配置域名的话，可以在这里写上完整的URL(加上域名部分)

let wechatLoginUrl = '/api/wechat/mini/login';
let userInfoByTokenUrl = '/v1/user/info';

let getGenerateLinkUrl = '/api/generate/link';

let extOrderListUrl = "/api/order";

let financeListUrl = "/api/user/wallet/log";

let myTeamUrl = "/api/user/child";
let posterUrl = "/api/user/share/image";

let wechatBindMobileUrl = "/api/user/bind/wechat/mobile";

let withdrawalUrl = "/api/cash";
let bindAlipayUrl = "/api/user/bind/alipay";
let alipayInfoUrl = "/api/user/alipay/info";

let bindMobileUrl = "/api/user/bind/mobile";

let cashTypeUrl = "/api/cash/type";
// 收益列表明细
let incomeUrl = "/api/user/income";
// 用户日统计
let incomeDayUrl = "/api/user/income/day"

let customerUrl = "/api/custom" 

/**
 * 商城
 */


let generateLinkUrl = "/api/goods/generate/link";
let searchGenerateLinkUrl = "/api/goods/search/generate/link";

let goodsSearchUrl = "/api/goods/search";
let goodsSearchDetailUrl = "/api/goods/search/detail";

let searchHotWordUrl = "/v1/search/hot/word"

/**
 * 订单
 */


let couponListUrl = "/v1/coupon/list";
let couponReceiveUrl = "/v1/coupon/receive";
let userCouponUrl = "/v1/user/coupon";
let couponDetailUrl = "/v1/coupon/detail";

let footMarkUrl = "/v1/user/foot/mark"

/**
 * 话费充值
 */
let rechangeMobileConfigUrl = "/api/mobile/charge/config";
let rechangeCreateOrderUrl = "/api/order/mobile/charge";
let rechangePaymentUrl = "/api/order/mobile/charge/submit";

/**
 * 升级会员
 */
let userUpgradeVipUrl = "/api/user/upgrade/vip";

/**
 * 商务合作
 */
let businessUrl = "/api/business";

/**
 * 钱包
 * userCountUrl 日月报表
 * bankcardUrl 银行卡列表
 * 银行列表 /api/banks
 * 添加银行卡/api/user/card/add
 * 删除 api/user/bankcard/delete/{bankCardId}
 * 制定智还计划/api/plan/make/auto
 * 账单管理 /api/plan
 * 更新置换 /api/plan/make/update
 * 
 绑卡 /api/channel/authentication
 确认绑卡/api/channel/authentication/confirm
 收银通道 /api/channel/cashier
 验证码 /api/tool/auth/code
 制定收银计划 /api/plan/cashier/confirm
 确认收银计划 /api/plan/cashier
  收银列表	/api/plan/cashier/list
 */
let userCountUrl = "/api/user/count";
let userCashtUrl = "/api/user/cash"; // 发起提现
let withdrawalLogUrl = "/api/user/cash/list";
let areaIdUrl = "/api/area";

//用户费率
let userPaymentConfigUrl = "/api/user/payment/config"


const http = uni.$u.http

////////////////////


////////////////////



export const wechatLogin = (params = {}) => http.post(wechatLoginUrl, params);
export const userInfoByToken = (params = {}) => http.get(userInfoByTokenUrl, params);

export const getGenerateLink = (params = {}) => http.post(getGenerateLinkUrl, params);
export const extOrderList = (params = {}) => http.get(extOrderListUrl, params);

export const financeList = (params = {}) => http.get(financeListUrl, params);

export const poster = (params = {}) => http.get(posterUrl, params);
export const wechatBindMobile = (params = {}) => http.post(wechatBindMobileUrl, params);
export const withdrawal = (params = {}) => http.post(withdrawalUrl, params);
export const withdrawalLog = (params = {}) => http.get(withdrawalLogUrl, params);

export const bindAlipay = (params = {}) => http.post(bindAlipayUrl, params);
export const alipayInfo = (params = {}) => http.get(alipayInfoUrl, params);
export const bindMobile = (params = {}) => http.post(bindMobileUrl, params);

export const generateLink = (params = {}) => http.get(generateLinkUrl, params);
export const searchGenerateLink = (params = {}) => http.get(searchGenerateLinkUrl, params);

export const goodsSearch = (params = {}) => http.get(goodsSearchUrl, {params});
export const goodsSearchDetail = (params = {}) => http.get(goodsSearchDetailUrl, params);

export const cashType = (params = {}) => http.get(cashTypeUrl, params);




export const searchHotWord = (params = {}) => http.get(searchHotWordUrl, params);

export const rechangeMobileConfig = (params = {}) => http.get(rechangeMobileConfigUrl, params);
export const rechangeCreateOrder = (params = {}) => http.post(rechangeCreateOrderUrl, params);
export const rechangePayment = (params = {}) => http.post(rechangePaymentUrl, params);



export const couponList = (params = {}) => http.get(couponListUrl, {params});
export const couponReceive = (params = {}) => http.post(couponReceiveUrl, params);

export const userCoupon = (params = {}) => http.get(userCouponUrl, {params});
export const couponDetail = (params = {}) => http.get(couponDetailUrl, {params});

export const userUpgradeVip = (params = {}) => http.post(userUpgradeVipUrl, params);

export const footMark = (params = {}) => http.get(footMarkUrl, params);

export const business = (params = {}) => http.post(businessUrl, params);
export const incomeList = (params = {}) => http.get(incomeUrl, {params});
export const incomeDayList = (params = {}) => http.get(incomeDayUrl, {params});
export const userCount = (params = {}) => http.post(userCountUrl, params); //日月报表

export const areaId = (params = {}) => http.post(areaIdUrl, params); //收银列表







export const userPaymentConfig = (params = {}) => http.get(userPaymentConfigUrl, {params});

export const customer = (params = {}) => http.get(customerUrl, params);

// 此处使用了传入的params参数，一切自定义即可

// export const getInfo = (params = {}) => http.post(indexUrl, params);
